<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>确认订单_{$web_name}</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="Keywords" content="确认订单" />
		<meta name="Description" content="确认订单" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
		<meta name="format-detection" content="telephone=no">
		<tc_include file="Public:head" />
		<link rel="stylesheet" type="text/css" href="__TMPL__Home/Pay/Css/pay.css" />
	</head>

	<body>

		<tc_include file="Public:nav" />
		<div class="w990" id="content" style="background: none;">
			<div class="content cart-box">
				<div class="cart-step" style="padding-left: 132px;">
					<ul>
						<li class="cart1"><i></i>礼品领取</li>
						<li class="cart2"><i></i>确认订单</li>
						<li class="cart3"><i></i>领取成功</li>
					
					</ul>
				</div>

				<!--收货人信息-->

				<div class="add-deliver">
					<div class="cart-title">
						<h3>
							<span>收货人信息</span>
						</h3>
					</div>

					<div class="sh-address js-shipping-address">
						<ul>
							<foreach name="useraddress" item="v">

								<li class="other-add 	<eq name='v.is_default' value='1'>default-add</eq>" data-id="{$v.address_id}">
									<div class="add-box">
										<span class="remove vivi-blue js-shipping-address-remove" data-id="{$v.address_id}">X</span>
										<div class="name-add">
											<span class="name">{$v.consigner}</span>
											<span class="add-rside"></span>
										</div>
										<div class="elli add-detail">
											<p title="{$v.address}">{$v.province}&nbsp;{$v.city}&nbsp;{$v.district} {$v.address}</p>
										</div>
										<div>
											<span class="moblie">{$v.mobile}</span>
											<a href="javascript:void(0);" class="chang-default change vivi-blue js-update-shipping-address" data-id="{$v.address_id}">修改地址</a>
										</div>
									</div>
									<i class="icon-check"></i>
								</li>
							</foreach>
							<li class="add-add">
								<div class="add-box add-box-center js-add-shipping-address">
									<a href="javascript:;"><i class="icon-add-add"></i>添加新地址</a>
								</div>
							</li>
						</ul>
					</div>
				</div>
				<!--商品信息-->
				<div class="goods-infor">
					<div class="cart-title">
						<h3>
					<span>商品信息</span>
					
				</h3>
				<php>$is_tuan=0;</php>
					</div>
					<div class="goods-table">
						<div class="goods-thead">
							<div class="col col1">商品</div>
							<div class="col col3">单价</div>
							<div class="col col4">数量</div>
							<div class="col col5">小计</div>
						</div>
						<div class="goods-tbody">
							
									<div class="goodinfo" >
										<div class="col col1 goods-title-pic">
											<a href="{:U('shop/index',array('id'=>$shop_info['id']))}" target="_blank">
												<img src="{$shop_info.image}" width="60" height="60">
											</a>
											<div class="goods-describ elli">
												<p style="word-break: break-all; word-wrap:break-word;">
													<a href="{:U('shop/index',array('id'=>$shop_info['id']))}" target="_blank">{$shop_info.title}&nbsp;&nbsp;</a>
												</p>
											</div>
						
										</div>
										<div class="col col3 goods-price" style="line-height: 20px;">￥{:number_format($shop_info['price'],2)}
											

										</div>
										<div class="col col4 good-num">{$info.recommend_shop_num}</div>
										<div class="col col5 orange-bold xiaoji"  style="border-bottom-style: none;">￥0.00</div>
										
									</div>
						
						</div>

					</div>

					<div class="style-zhifu">
						<div class="cart-title">
							<h3>
								<span>支付方式</span>
							</h3>
						</div>

						<div class="zhifu-box">
							<ul class="zfb" id="paylist">
								<li>
									<i class="icon-check-zf" style="display: block;"></i>
									<a href="javascript:void(0);" data-select="0" class="selected">
										<span>礼品领取</span>
									</a>
								</li>
								<!--<li>
									<i class="icon-check-zf" style="display: none;"></i>
									<a href="javascript:void(0);" data-select="4" class="">
										<span>货到付款</span>
									</a>
								</li>-->
							</ul>
						</div>
					</div>
				
				
					<div class="fare-result">
						<div class="cart-title">
							<h3>
								<span>结算信息</span>
							</h3>
						</div>
						<div class="result-box">

							<ul>
								<li style="float:left;clear:none;">
									<div style="width: 400px; float: left; font-size: 14px;">
										<label class="list-name" for="leavemess">留言：</label>
										<textarea id="leavemessage" maxlength="100" placeholder="买家留言"></textarea>
									</div>
								</li>
							
								<li style="border: 1px solid #e4e4e4;">

									<div class="rside">
										
										<a href="javascript:void(0);" class="btn-jiesuan">立即领取</a>

									</div>
								</li>
							</ul>
						</div>
					</div>
				</div>

			</div>
		</div>
		
		<div style="clear: both;"></div>
		<tc_include file="Public:footer" />
		<!--//提示框-->
		<div id="mask" style="display: none;"></div>
		<div class="pop-main pop-compare" style="display: none;">
			<div class="pop-header">
				<span>温馨提示</span>
				<a class="pop-close" href="javascript:;" title="关闭"></a>
			</div>
			<div class="pop-con">
				<i class="pop-icon"></i>
				<p class="pop-text">您确认要删除吗？</p>
				<a href="javascript:;" class="pop-sure main-bg-color">确定</a>
				<a href="javascript:;" class="cancel-btn">取消</a>
			</div>
		</div>

		<script src="__TMPL__Home/Pay/js/shipping_address.js"></script>
		<div class="edit-address modbox" style="display: none;margin-left:-400px;">
			<div class="edit-box">
				<h3>新增收货地址信息<i class="close-modbox"></i></h3>
				<div class="edit-form">
					<ul>
						<li>
							<label><i>*</i>收货人：</label>
							<input type="text" id="consigner" maxlength="20" class="s-length">
						</li>
						<li>
							<label><i>*</i>手机号码：</label>
							<input type="text" id="mobile" maxlength="11" class="s-length">
						</li>
						<li>
							<label>固定电话：</label>
							<input type="text" id="phone" maxlength="20" class="s-length">
						</li>
						<li style="min-height: 25px;">
							<label style="width: 75px; float: left;"><i>*</i>所在地区：</label>
							<div class="deliver" style="float: left;">
								<div id="store-selector">

									<select name="province" id="selProvinces" onchange="getProvince(this,'#selCities')" class="select_addr">
										<option value="-1">请选择省</option>
									</select>
									<select name="city" id="selCities" onchange="getSelCity(this,'#selDistricts')" class="select_addr">
										<option value="-1">请选择市</option>
									</select>
									<select name="district" id="selDistricts" class="select_addr">
										<option value="-1">请选择区</option>
									</select>
									<div class="required-notice fl">
										<i class="notice-icon"></i><span class="notice-text address-notice"></span>
									</div>
									<script>
										initProvince("#selProvinces");
									</script>
								</div>
							</div>
						</li>
						<li style="clear: both;">
							<label><i>*</i>详细地址：</label>
							<input type="text" id="detailed_address" maxlength="30" class="l-length">
						</li>
						<li style="clear: both;">
							<label>邮编：</label>
							<input type="text" id="zipcode" maxlength="30" class="l-length">
						</li>
					</ul>
					<input type="hidden" id="address_id" value="">
					<button class="btn-save" id="save_shipping_address">保存</button>
				</div>
			</div>
		</div>
	<script type="text/javascript">
		$(function(){
			
			$("#coupon").change(function(){
				var youhui_price=$("#coupon").attr("data_price");
				var obj=document.getElementById("coupon");  
				var index=obj.selectedIndex;  
				var prcie=obj.options[index].getAttribute("data_price");  
				$('#discount_money').html(prcie);
				var count_price=$('#count_price_gg').val();
				var count_price=parseInt(count_price);
				var prcie=parseInt(prcie);
				var cha_price=count_price-prcie;
				$('#realprice').html(cha_price.toFixed(2));
			
				
			});
			$('.btn-jiesuan').click(function(){
				var rec_id={$_GET['rec_id']};
				var recommend_shop_id={$_GET['recommend_shop_id']};
				var recommend_shop_num={$_GET['recommend_shop_num']};
				var leavemessage=$('#leavemessage').val();
				$.ajax({
					url : "/pay/generate_order2",
					type : "post",
					data : { 
						"leavemessage" : leavemessage,
						"rec_id" : rec_id,
						"recommend_shop_id" : recommend_shop_id,
						"recommend_shop_num" : recommend_shop_num
					},
					success : function(res){
						if(res.code==1){
							layer.msg(res.message);
							setTimeout("window.location.href='/user/order_info/order/"+res.data+"';",2000);
						}else{
							layer.msg(res.message);
						}
					}
				});
				
			})
		})
	</script>
	</body>

</html>